

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Welcome to pymunk’s documentation! &mdash; pymunk 3.0.0 documentation</title>
    
    <link rel="stylesheet" href="_static/pymunk.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '3.0.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/pymunk_favicon.ico"/>
    <link rel="top" title="pymunk 3.0.0 documentation" href="#" />
    <link rel="next" title="Readme" href="readme.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="readme.html" title="Readme"
             accesskey="N">next</a> |</li>
        <li><a href="#">pymunk 3.0.0 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="welcome-to-pymunk-s-documentation">
<h1>Welcome to pymunk&#8217;s documentation!<a class="headerlink" href="#welcome-to-pymunk-s-documentation" title="Permalink to this headline">¶</a></h1>
<p>pymunk is a easy-to-use pythonic 2d physics library that can be used whenever
you need 2d rigid body physics from Python. It is built on top of the very
nice 2d physics library Chipmunk.</p>
<div class="section" id="getting-started">
<h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline">¶</a></h2>
<p>To get started quickly take a look in the <a class="reference internal" href="readme.html"><em>Readme</em></a>, it contains a
summary of the most important things and is quick to read. When done its a
good idea to take a look at the included <a class="reference internal" href="examples.html"><em>Examples</em></a>, read the
<a class="reference internal" href="tutorials.html"><em>Tutorials</em></a> and take a look in the <a class="reference internal" href="pymunk.html"><em>API Reference</em></a>.</p>
</div>
<div class="section" id="the-pymunk-vision">
<h2>The pymunk Vision<a class="headerlink" href="#the-pymunk-vision" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>&#8220;<em>Make 2d physics easy to include in your game :)</em>&#8220;</div></blockquote>
<p>It is (or is striving to be):</p>
<ul class="simple">
<li><strong>Easy to use</strong> - It should be easy to use, no complicated stuff should be
needed to add physics to your game/program.</li>
<li><strong>&#8220;Pythonic&#8221;</strong> - It should not be visible that a c-library (chipmunk) is in
the bottom, it should feel like a python library (no strange naming, OO,
no memory handling and more)</li>
<li><strong>Simple to build &amp; install</strong> - You shouldnt need to have a zillion of
libraries installed to make it install, or do a lot of command line trixs.</li>
<li><strong>Multiplatform</strong> - Should work on both windows, *nix and OSX.</li>
<li><strong>Non-intrusive</strong> - It should not put restrictions on how you structure
your program and not force you to use a special game loop, it should be
possible to use with other libraries like pygame and pyglet.</li>
</ul>
</div>
<div class="section" id="contact-support">
<h2>Contact &amp; Support<a class="headerlink" href="#contact-support" title="Permalink to this headline">¶</a></h2>
<dl class="docutils">
<dt><strong>Stackoverflow</strong></dt>
<dd>You can ask questions/browse old ones at stackoverflow, just look for
the pymunk tag. <a class="reference external" href="http://stackoverflow.com/questions/tagged/pymunk">http://stackoverflow.com/questions/tagged/pymunk</a></dd>
<dt><strong>Forum</strong></dt>
<dd>Currently pymunk has no separate forum, but you can use the general
Chipmunk forum at <a class="reference external" href="http://chipmunk-physics.net/forum/index.php">http://chipmunk-physics.net/forum/index.php</a> Many issues
are the same, like how to create a rag doll or why a fast moving object
pass through a wall. If you have a pymunk specific question you can mark
your post with [pymunk] to make it stand out a bit.</dd>
<dt><strong>Mail</strong></dt>
<dd>You can email me directly: <a class="reference external" href="mailto:vb&#37;&#52;&#48;viblo&#46;se">vb<span>&#64;</span>viblo<span>&#46;</span>se</a></dd>
<dt><strong>Issue Tracker</strong></dt>
<dd>Please use the issue tracker at google code to report any issues you find:
<a class="reference external" href="http://code.google.com/p/pymunk/">http://code.google.com/p/pymunk/</a></dd>
</dl>
<p>Regardless of the method you use I will try to answer your questions as soon
as I see them. (And if you ask on on SO or the forum other people might help
as well!)</p>
</div>
<div class="section" id="contents">
<h2>Contents<a class="headerlink" href="#contents" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="readme.html">Readme</a><ul>
<li class="toctree-l2"><a class="reference internal" href="readme.html#about">About</a></li>
<li class="toctree-l2"><a class="reference internal" href="readme.html#how-to-use">How to Use</a></li>
<li class="toctree-l2"><a class="reference internal" href="readme.html#example">Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="readme.html#dependencies-requirements">Dependencies / Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="readme.html#chipmunk">Chipmunk</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation.html#without-installation">Without installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#install-pymunk">Install pymunk</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#compile-chipmunk">Compile Chipmunk</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pymunk.html">API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pymunk.html#pymunk-package"><tt class="docutils literal"><span class="pre">pymunk</span></tt> Package</a><ul>
<li class="toctree-l3"><a class="reference internal" href="pymunk.constraint.html"><tt class="docutils literal"><span class="pre">pymunk.constraint</span></tt> Module</a><ul class="simple">
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pymunk.vec2d.html"><tt class="docutils literal"><span class="pre">pymunk.vec2d</span></tt> Module</a><ul class="simple">
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pymunk.util.html"><tt class="docutils literal"><span class="pre">pymunk.util</span></tt> Module</a><ul class="simple">
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pymunk.pygame_util.html"><tt class="docutils literal"><span class="pre">pymunk.pygame_util</span></tt> Module</a></li>
<li class="toctree-l3"><a class="reference internal" href="pymunkoptions.html"><tt class="docutils literal"><span class="pre">pymunkoptions</span></tt> Module</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#arrows-py">arrows.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#balls-and-lines-py">balls_and_lines.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#basic-test-py">basic_test.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#bouncing-balls-py">bouncing_balls.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#box2d-pyramid-py">box2d_pyramid.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#box2d-vertical-stack-py">box2d_vertical_stack.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#breakout-py">breakout.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#contact-and-no-flipy-py">contact_and_no_flipy.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#contact-with-friction-py">contact_with_friction.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#flipper-py">flipper.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#newtons-cradle-py">newtons_cradle.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#playground-py">playground.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#point-query-py">point_query.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#polygon-triangulation-py">polygon_triangulation.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#py2exe-setup-basic-test-py">py2exe_setup__basic_test.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#py2exe-setup-breakout-py">py2exe_setup__breakout.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#pygame-util-demo-py">pygame_util_demo.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#run-py">run.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#slide-and-pinjoint-py">slide_and_pinjoint.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#using-sprites-py">using_sprites.py</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="tutorials.html">Tutorials</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tutorials/Arrows.html">Arrows and other pointy sticky things</a><ul>
<li class="toctree-l3"><a class="reference internal" href="tutorials/Arrows.html#before-we-start">Before we start</a></li>
<li class="toctree-l3"><a class="reference internal" href="tutorials/Arrows.html#basic-scene">Basic scene</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="tutorials/SlideAndPinJoint.html">Slide and Pin Joint Demo Step by Step</a><ul>
<li class="toctree-l3"><a class="reference internal" href="tutorials/SlideAndPinJoint.html#before-we-start">Before we start</a></li>
<li class="toctree-l3"><a class="reference internal" href="tutorials/SlideAndPinJoint.html#an-empty-simulation">An empty simulation</a></li>
<li class="toctree-l3"><a class="reference internal" href="tutorials/SlideAndPinJoint.html#falling-balls">Falling balls</a></li>
<li class="toctree-l3"><a class="reference internal" href="tutorials/SlideAndPinJoint.html#a-static-l">A static L</a></li>
<li class="toctree-l3"><a class="reference internal" href="tutorials/SlideAndPinJoint.html#joints-1">Joints (1)</a></li>
<li class="toctree-l3"><a class="reference internal" href="tutorials/SlideAndPinJoint.html#joints-2">Joints (2)</a></li>
<li class="toctree-l3"><a class="reference internal" href="tutorials/SlideAndPinJoint.html#the-end">The end</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="advanced.html">Advanced</a><ul>
<li class="toctree-l2"><a class="reference internal" href="advanced.html#why-ctypes">Why ctypes?</a></li>
<li class="toctree-l2"><a class="reference internal" href="advanced.html#code-layout">Code Layout</a></li>
<li class="toctree-l2"><a class="reference internal" href="advanced.html#tests">Tests</a></li>
<li class="toctree-l2"><a class="reference internal" href="advanced.html#working-with-non-wrapped-parts-of-chipmunk">Working with non-wrapped parts of Chipmunk</a></li>
<li class="toctree-l2"><a class="reference internal" href="advanced.html#regenerate-bindings-to-chipmunk">Regenerate bindings to Chipmunk</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="indices-and-tables">
<h2>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
<li><a class="reference internal" href="py-modindex.html"><em>Module Index</em></a></li>
<li><a class="reference internal" href="search.html"><em>Search Page</em></a></li>
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="#">
              <img class="logo" src="_static/pymunk_logo_sphinx.png" alt="Logo"/>
            </a></p>
<h3><a href="#">Table Of Contents</a></h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="readme.html">Readme</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="pymunk.html">API Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced.html">Advanced</a></li>
</ul>

  <h4>Next topic</h4>
  <p class="topless"><a href="readme.html"
                        title="next chapter">Readme</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/index.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="readme.html" title="Readme"
             >next</a> |</li>
        <li><a href="#">pymunk 3.0.0 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, Victor Blomqvist.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>